import socket
import threading,time
from base import deal

from collections import deque
q = deque([],100)

while True:
    try:
        s = socket.socket()
        add = ('127.0.0.1',16789)
        s.connect(add)
        s.sendall(b'1x34x6')
        s2 = socket.socket()
        s2.connect(('42.51.28.250',22))
        t = threading.Thread(target=deal,args=(s,s2))
        t.setDaemon(True)
        t.start()
        q.append(t)
       
    except Exception as e:
        #print(e)
        time.sleep(1)
    


